package com.my.model;

import com.my.enums.ContentType;

import java.lang.reflect.Method;

/**
 * @author WangLuoXin
 * &#064;Date 2024/9/12  10:46
 **/
public class HandlerDetails {

    //全限定路径
    private String path;

    //返回数据格式类型
    private ContentType contentType;

    //处理器对象
    private Object instance;

    //处理器方法
    private Method method;

    //路径参数 请求时解析 id,name     id
    private String pathVariable;

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Object getInstance() {
        return instance;
    }

    public void setInstance(Object instance) {
        this.instance = instance;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public ContentType getContentType() {
        return contentType;
    }

    public void setContentType(ContentType contentType) {
        this.contentType = contentType;
    }


    @Override
    public String toString() {
        return "HandlerDetails{" + "path='" + path + '\'' + ", contentType=" + contentType + ", instance=" + instance + '}';
    }

    public String getPathVariable() {
        return pathVariable;
    }

    public void setPathVariable(String pathVariable) {
        this.pathVariable = pathVariable;
    }
}
